package com.tmptSource.dto;

import java.io.Serializable;
import com.tmptSource.enums.*;

/**
 * Created by wxy on 2017/8/26.
 */
public class ${classNameFirstWordUpper}Dto implements Serializable {

    private static final long serialVersionUID = 1L;

    //----------------------------------------
    // model
    //----------------------------------------
    <#list columnList as column>
    <#--@MyField
    <#if column.columnType4JavaEncap=='Timestamp'>
    @MyDateFormat<#if column.columnType=='date'>(format = "yyyy-MM-dd")</#if>
    <#elseif column.dataTransfer=='fen2yuan'>
    @MyFenAndYuan
    <#elseif column.dataResource==1 || column.dataResource==4>
    @MyOptions(enumName="com.tmpt.enums.${column.enumClassName}",newFieldName="${column.propertyName}_Str")
    <#elseif column.dataResource==5>
    @MyOptions(enumName="com.tmpt.enums.${column.propertyNameFirstWordUpper}",newFieldName="${column.propertyName}_Str")
    </#if>-->
    private String ${column.propertyName};
    </#list>

    //----------------------------------------
    // 与页面交互时的参数
    //----------------------------------------
    <#list columnList as column>
    <#if column.columnType4JavaEncap=='Timestamp' || column.queryType=='between'>
    <#--@MyField(asParameter=true)
    <#if column.columnType4JavaEncap=='Timestamp'>
    @MyDateFormat<#if column.columnType=='date'>(format = "yyyy-MM-dd")</#if>
    <#elseif column.dataTransfer=='fen2yuan'>
    @MyFenAndYuan
    </#if>&ndash;&gt;-->
    private String ${column.propertyName}_Start;
    <#--@MyField(asParameter=true)
    <#if column.columnType4JavaEncap=='Timestamp'>
    @MyDateFormat<#if column.columnType=='date'>(format = "yyyy-MM-dd")</#if>
    <#elseif column.dataTransfer=='fen2yuan'>
    @MyFenAndYuan
    </#if>-->
    private String ${column.propertyName}_End;
    </#if>
    </#list>

    //多选项Options，加_Str做数据显示
    <#list columnList as column>
    <#if column.dataResource==1 || column.dataResource==4 ||column.dataResource==5>
    private String ${column.propertyName}_Str;
    </#if>
    </#list>


    //=====================================================
    // setter getter method
    //=====================================================

<#list columnList as column>
    <#if column.dataResource==1 || column.dataResource==4 ||column.dataResource==5>
    public String get${column.propertyNameFirstWordUpper}_Str(){
        ${column.propertyName}_Str = <#if column.dataResource==5>${column.propertyNameFirstWordUpper}<#else>${column.enumClassName}</#if>.explain(${column.propertyName},"");
        return ${column.propertyName}_Str;
    }
    public void set${column.propertyNameFirstWordUpper}_Str(String ${column.propertyName}_Str){
        this.${column.propertyName}_Str = ${column.propertyName}_Str;
    }
    </#if>
</#list>

<#list columnList as column>
    public String get${column.propertyNameFirstWordUpper}(){
        return this.${column.propertyName};
    }
    public void set${column.propertyNameFirstWordUpper}(String ${column.propertyName}){
        this.${column.propertyName}=${column.propertyName};
    }
</#list>

<#list columnList as column>
    <#if  column.columnType4JavaEncap=='Timestamp'>
    public String get${column.propertyNameFirstWordUpper}_Start(){
        return ${column.propertyName}_Start;
    }
    public void set${column.propertyNameFirstWordUpper}_Start(String ${column.propertyName}_Start){
        this.${column.propertyName}_Start = ${column.propertyName}_Start;
    }
    public String get${column.propertyNameFirstWordUpper}_End(){
        return ${column.propertyName}_End;
    }
    public void set${column.propertyNameFirstWordUpper}_End(String ${column.propertyName}_End){
        this.${column.propertyName}_End = ${column.propertyName}_End;
       <#-- <#if column.columnType=='date'>
        //UI中是date类型（不是datetime）,做下处理加23:59:59.999
        this.${column.propertyName}_End = DateTool.timestampAppend235959999(this.${column.propertyName}_End);
        <#else>
        //UI中是datetime类型（不是date）,不用加23:59:59.999处理
        this.${column.propertyName}_End = this.${column.propertyName}_End;
        </#if>-->
    }
    <#elseif column.queryType=='between'>
    public String get${column.propertyNameFirstWordUpper}_Start(){
        return ${column.propertyName}_Start;
    }
    public void set${column.propertyNameFirstWordUpper}_Start(String ${column.propertyName}_Start){
        this.${column.propertyName}_Start = ${column.propertyName}_Start;
    }
    public String get${column.propertyNameFirstWordUpper}_End(){
        return ${column.propertyName}_End;
    }
    public void set${column.propertyNameFirstWordUpper}_End(String ${column.propertyName}_End){
        this.${column.propertyName}_End = ${column.propertyName}_End;
    }
    </#if>
</#list>


}
